def lucky_sum(a, b, c):
  if a!=13:
    if b==13:
      return(a)
    else:
      if c==13:
        return(a+b)
      else:
        return(a+b+c)
  else:
    if b!=13 or c!=13:
      return(0)
    else:
      return(0)